import request from "@/utils/request";
// 菜单基础URL

const ExportApi = {
  //订单
  orderExport(queryParams: any) {
    return request<any>({
      url: "order/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //发票
  invoiceExport(queryParams: any) {
    return request<any>({
      url: "invoice/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //司机
  driverExport(queryParams: any) {
    return request<any>({
      url: "driverInfo/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  rateExport(queryParams: any) {
    return request<any>({
      url: "orderRate/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //流水导出
  walletExport(queryParams: any) {
    return request<any>({
      url: "wallet/records/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //提现导出
  withdrawExport(queryParams: any) {
    return request<any>({
      url: "wallet/withdraw/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //询价记录导出
  priceRecordExport(queryParams: any) {
    return request<any>({
      url: "estimateRecord/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //账单导出
  billExport(queryParams: any) {
    return request<any>({
      url: "billing/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //供应商提现导出
  supplierWithdrawExport(queryParams: any) {
    return request<any>({
      url: "supplierWithdraw/export",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //账单导出
  itemExport(queryParams: any) {
    return request<any>({
      url: "billing/exportId",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  supplier(queryParams: any) {
    return request<any>({
      url: "billing/exportSupplier",
      method: "get",
      params: queryParams,
      responseType: "blob",
    });
  },
  //罚款导入
  fkImport(data: any) {
    return request<any>({
      url: "billing/fineImport",
      method: "post",
      data: data,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  },
  //扣款导入
  kkImport(data: any) {
    return request<any>({
      url: "billing/cutImport",
      method: "post",
      data: data,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  },
  //补偿导入
  bcImport(data: any) {
    return request<any>({
      url: "billing/compensationImport",
      method: "post",
      data: data,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  },
  //作废导入
  zfImport(data: any) {
    return request<any>({
      url: "billing/cancelImport",
      method: "post",
      data: data,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  },
  supplierImport(data: any) {
    return request<any>({
      url: "billing/supplierCompensationImport",
      method: "post",
      data: data,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  },
};

export default ExportApi;
